home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / cuj0696.zip / DWYER.ZIP / SPECTRAL.TST / TSTEPOW.CX < prev    next >
Text File  |  1996-03-09  |  793b  |  34 lines

  1. /* ============ */
  2. /* tstepow.c    */
  3. /* ============ */
  4. #include <xtendefs.h>
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <math.h>
  8. /* ==================================================================== */
  9. /* */
  10. /* ==================================================================== */
  11. void
  12. main()
  13. {
  14.     USHORT  Answer[NE], Base[NE], Exponent[NE];
  15.  
  16.     ASCTOX("-3.0", Base);
  17. XPRINTF("Base     = ", Base, 0);
  18.     ASCTOX("3.0", Base);
  19. XPRINTF("Base     = ", Base, 0);
  20.  
  21.     ASCTOX("2.49", Exponent);
  22. XPRINTF("Exponent = ", Exponent, NDEC);
  23.  
  24.     XPOW(Base, Exponent, Answer);
  25. XPRINTF("3^2.49   = ", Answer, NDEC);
  26.  
  27.     ASCTOX("2.5", Exponent);
  28. XPRINTF("Exponent = ", Exponent, NDEC);
  29.     XPOW(ETWO, Exponent, Answer);
  30.  
  31.  
  32.     XPRINTF("2^2.5 = ", Answer, NDEC);
  33. }
  34.